<!DOCTYPE html>

<!--注意：引入thymeleaf的名称空间-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta http-equiv="Window-target" content="_top">
    <title>列表</title>

    <link href="/plugins/jquery-bootgrid/jquery.bootgrid.min.css" th:href="@{/plugins/jquery-bootgrid/jquery.bootgrid.min.css}" rel="stylesheet">


    <script src="/js/jquery-3.4.1.min.js" th:src="@{/js/jquery-3.4.1.min.js}"></script>

    <script src="/plugins/jquery-bootgrid/jquery.bootgrid.min.js" th:src="@{/plugins/jquery-bootgrid/jquery.bootgrid.min.js}"></script>
    <script src="/plugins/jquery-bootgrid/jquery.bootgrid.fa.min.js" th:src="@{/plugins/jquery-bootgrid/jquery.bootgrid.fa.min.js}"></script>

    <script type="application/javascript">
        $(document).ready(function(){
            initGrid();
        });

        function initGrid() {
            var userName= '[[${session.record?.loginPalce}]]';
            if(userName != ""){
                $("#grid-data").bootgrid({
                    ajax: true,
                    post: function ()
                    {
                        return {
                            id: "b0df282a-0d67-40e5-8558-c9e93b7befed"
                        };
                    },
                    url: "/studyActionRecord/gridData",
                    formatters: {
                        "link": function(column, row)
                        {
                            return "<a href=\"#\">" + column.id + ": " + row.id + "</a>";
                        }
                    }
                });
            }

        }
    </script>
</head>

<body>
<table id="grid-data" class="table table-condensed table-hover table-striped">
    <thead>
    <tr>
        <th data-column-id="id" data-type="numeric">ID</th>
        <th data-column-id="createTime" data-order="desc">createTime</th>
        <th data-column-id="loginPalce" >loginPalce</th>
        <th data-column-id="ipAddress" data-formatter="link" data-sortable="false">ipAddress</th>
    </tr>
    </thead>
</table>
</body>
</html>